#pragma once


// CClickMask
class CChkcodeDlg;
class CClickMask : public CStatic
{
	DECLARE_DYNAMIC(CClickMask)

public:
	CClickMask(intptr_t id);
	~CClickMask() override;

protected:
	DECLARE_MESSAGE_MAP()

	void SetSize(intptr_t w, intptr_t h, CDC *pdc = nullptr);

	CChkcodeDlg *m_pParent;
	CDC buttonDC, maskDC;
	intptr_t m_id, width, height;
	BLENDFUNCTION bf;
	CBitmap bmpIcon;
	intptr_t iconWidth, iconHeight;
	CPoint flashButtonPos;
public:
	BOOL Create(CChkcodeDlg* pParentWnd, bool isOverlapped, UINT nID = 0xffff);
	BOOL DestroyWindow() override;
	afx_msg void OnPaint();
	intptr_t getClickMaskID() { return m_id; }
	bool ShowMask(bool focusWebPage = true);
	void HideMask() { ShowWindow(SW_HIDE); }
	bool CheckShow(bool focusWebPage = true);
	bool SetPosition();
	bool IsInrange(CRect &pFlash);
	void drawButton(CBitmap &buttonBmp, bool invalidate = true);
};
